﻿@using BootstrapBlazor.Shared.Samples
@inject IStringLocalizer<Searchs> Localizer

<Search IgnoreCase="true"
        IsLikeMatch="true"
        PlaceHolder="@Localizer["SearchsPlaceHolder"]"
        IsOnInputTrigger="true"
        Items="@Items"
        OnSearch="@OnSearch" />
<BlockLogger @ref="Trace" class="mt-3" />

@code {
    [NotNull]
    private BlockLogger? Trace { get; set; }

    private static IEnumerable<string> Items => new string[] { "1", "12", "123", "1234" };

    private Task OnSearch(string searchText)
    {
        Trace.Log($"SearchText: {searchText}");
        return Task.CompletedTask;
    }
}
